package cn.iocoder.yudao.module.crossborder.product.api.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * 商品创建请求 DTO
 *
 * @author LHL
 */
@Schema(description = "RPC 服务 - 商品创建请求 DTO")
@Data
public class ProductCreateReqDTO {

    @Schema(description = "商品编码", example = "PROD001")
    private String code;

    @Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "iPhone 15 Pro")
    @NotEmpty(message = "商品名称不能为空")
    private String name;

    @Schema(description = "商品简介", example = "最新款iPhone，性能强劲")
    private String summary;

    @Schema(description = "商品描述", example = "详细的商品描述信息")
    private String description;

    @Schema(description = "商品分类编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
    @NotNull(message = "商品分类不能为空")
    private Long categoryId;

    @Schema(description = "商品品牌编号", example = "3072")
    private Long brandId;

    @Schema(description = "商品类型", example = "1")
    private Integer type;

    @Schema(description = "商品单位", example = "台")
    private String unit;

    @Schema(description = "商品重量(kg)", example = "0.5")
    private BigDecimal weight;

    @Schema(description = "商品体积(cm³)", example = "500")
    private BigDecimal volume;

    @Schema(description = "商品主图", example = "https://example.com/product.jpg")
    private String mainImage;

    @Schema(description = "商品图片列表", example = "[\"https://example.com/1.jpg\", \"https://example.com/2.jpg\"]")
    private List<String> images;

    @Schema(description = "商品视频", example = "https://example.com/product.mp4")
    private String video;

    @Schema(description = "商品价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "999.00")
    @NotNull(message = "商品价格不能为空")
    private BigDecimal price;

    @Schema(description = "市场价格", example = "1299.00")
    private BigDecimal marketPrice;

    @Schema(description = "成本价格", example = "800.00")
    private BigDecimal costPrice;

    @Schema(description = "货币代码", example = "USD")
    private String currency;

    @Schema(description = "库存数量", example = "100")
    private Integer stock;

    @Schema(description = "预警库存", example = "10")
    private Integer alertStock;

    @Schema(description = "虚拟销量", example = "100")
    private Integer virtualSales;

    @Schema(description = "商品成色", example = "1")
    private Integer condition;

    @Schema(description = "是否多规格", example = "false")
    private Boolean multiSpec;

    @Schema(description = "商品规格", example = "256GB 深空黑色")
    private String spec;

    @Schema(description = "商品标签", example = "热销,推荐")
    private String tags;

    @Schema(description = "SEO标题", example = "iPhone 15 Pro - 最新款苹果手机")
    private String seoTitle;

    @Schema(description = "SEO关键词", example = "iPhone,苹果,手机")
    private String seoKeywords;

    @Schema(description = "SEO描述", example = "iPhone 15 Pro是苹果最新推出的旗舰手机")
    private String seoDescription;

    @Schema(description = "排序", example = "1")
    private Integer sort;

    @Schema(description = "备注", example = "热销商品")
    private String remark;

}
